Skip to content

[6.x] Remove web awesome dependency#19244

Merged
brandonkelly merged 16 commits into
6.xfrom
feature/remove-web-awesome
Jul 15, 2026
Merged

[6.x] Remove web awesome dependency#19244
brandonkelly merged 16 commits into
6.xfrom
feature/remove-web-awesome

Conversation

@brianjhanson

Copy link
Copy Markdown
Contributor

We have a few components in the craftcms/cp package that rely on Web Awesome. This removes that requirement so we aren't depending on both Lion and WA

brianjhanson and others added 10 commits July 7, 2026 17:13
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
vue-tsc pre-commit check skipped: it fails on pre-existing missing
generated artifacts (dist/wayfinder) in this worktree, unrelated to
this rename.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The open attribute is still supported; the open *property* is gone
because Lion's overlay system defines open() as a method. Use the
opened property at runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@brianjhanson brianjhanson changed the title Feature/remove web awesome [6.x] Remove web awesome dependency Jul 13, 2026
@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/cpopen Storybook

Changed components:

resources/jsopen Storybook

No changed components detected in this Storybook.

@brianjhanson
brianjhanson marked this pull request as ready for review July 14, 2026 20:48
@brianjhanson
brianjhanson requested a review from Copilot July 14, 2026 21:05
The old tooltip will be availble at `craft-legacy-tooltip`

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the Web Awesome dependency from the @craftcms/cp component package and updates the CMS Control Panel bootstrapping to use Lion-based overlays and a URL-based icon resolver, so CP UI no longer depends on both Lion and Web Awesome.

Changes:

  • Replaced Web Awesome-based overlay components (tooltip/popover/dialog) with Lion-based implementations and introduced craft-* overlay lifecycle events.
  • Implemented a fetch-based icon resolver with configurable base URL, and wired CMS CP bootstrap to configure it (plus legacy name normalization).
  • Removed Web Awesome-specific CSS tokens, build externals, and package dependencies; dropped CraftDrawer/CraftDropdown exports.

Reviewed changes

Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Cp/Cp.php Adds iconBaseUrl to CP bootstrap data for runtime icon URL configuration.
resources/js/modules/markdown-field/behaviors/link-popover.ts Updates listener from wa-after-hide to craft-after-hide for the new overlay lifecycle events.
resources/js/bootstrap/icons.ts Adds CP icon resolver configuration + legacy name normalization.
resources/js/bootstrap/cp.ts Initializes the icon resolver using iconBaseUrl from CP config.
packages/craftcms-cp/src/utilities/overlay-events.ts Adds Lion opened-changedcraft-* lifecycle event bridge.
packages/craftcms-cp/src/utilities/overlay-events.test.ts Adds tests for overlay lifecycle event bridging behavior.
packages/craftcms-cp/src/utilities/icons.ts Replaces Web Awesome icon library registration with a Lion icon resolver + fetch/caching implementation.
packages/craftcms-cp/src/utilities/icons.test.ts Updates/extends icon URL tests (including custom base URL coverage).
packages/craftcms-cp/src/styles/shared/tokens.css Removes Web Awesome design token overrides.
packages/craftcms-cp/src/index.ts Removes WA bootstrap and exports icon utilities; drops drawer/dropdown exports.
packages/craftcms-cp/src/components/tooltip/tooltip.ts Reimplements tooltip on Lion tooltip/overlay + emits craft-* lifecycle events.
packages/craftcms-cp/src/components/tooltip/tooltip.test.ts Adds tooltip behavior/event tests for the Lion-based implementation.
packages/craftcms-cp/src/components/tooltip/tooltip.stories.ts Removes obsolete WA import comment.
packages/craftcms-cp/src/components/tooltip/Tooltip.mdx Updates documentation to describe the new Lion-based tooltip API/events.
packages/craftcms-cp/src/components/popover/popover.ts Reimplements popover via Lion overlays + emits craft-* lifecycle events.
packages/craftcms-cp/src/components/popover/popover.test.ts Adds popover behavior/event tests for the Lion-based implementation.
packages/craftcms-cp/src/components/info-icon/info-icon.ts Updates event listeners from wa-* to craft-* overlay lifecycle events.
packages/craftcms-cp/src/components/info-icon/info-icon.stories.ts Switches stories to Lit html templates (string → TemplateResult).
packages/craftcms-cp/src/components/icon/icon.ts Reimplements <craft-icon> as a LitElement that resolves/fetches SVGs via the new resolver.
packages/craftcms-cp/src/components/icon/icon.test.ts Adds tests for fetch behavior, caching, accessibility attributes, and slotted SVG precedence.
packages/craftcms-cp/src/components/dropdown/dropdown.ts Removes Web Awesome dropdown wrapper component.
packages/craftcms-cp/src/components/dropdown/dropdown.styles.ts Removes dropdown styles file tied to the removed WA dropdown.
packages/craftcms-cp/src/components/dropdown/dropdown.stories.ts Removes dropdown Storybook stories.
packages/craftcms-cp/src/components/drawer/drawer.ts Removes Web Awesome drawer wrapper component.
packages/craftcms-cp/src/components/drawer/drawer.stories.ts Removes drawer Storybook stories.
packages/craftcms-cp/src/components/dialog/dialog.ts Reimplements dialog on Lion dialog/overlay and custom light-DOM structure/styling.
packages/craftcms-cp/src/components/dialog/dialog.test.ts Adds tests for dialog structure, open/attribute syncing, close affordances, and events.
packages/craftcms-cp/src/components/dialog/dialog.stories.ts Updates story usage from open to opened to match Lion dialog API.
packages/craftcms-cp/src/components/breadcrumb-item/breadcrumb-item.ts Reimplements breadcrumb item without WA, with link rendering and separator slot.
packages/craftcms-cp/src/components/breadcrumb-item/breadcrumb-item.test.ts Adds tests for breadcrumb item link/span rendering and separator slot behavior.
packages/craftcms-cp/scripts/generate-vue-wrappers.js Removes drawer/dropdown from generated Vue wrapper list.
packages/craftcms-cp/scripts/build.js Removes @awesome.me/webawesome from build externals.
packages/craftcms-cp/package.json Removes Web Awesome peer/dev dependency entries.
packages/craftcms-cp/.storybook/preview.ts Switches Storybook icon resolver wiring to the new icon utility functions.
package-lock.json Removes Web Awesome dependency entries.
Comments suppressed due to low confidence (1)

packages/craftcms-cp/src/utilities/icons.ts:89

  • getIconUrl() strips the .svg suffix before parsing a variant-prefixed name. For inputs like regular/x.svg, the .svg removal happens on the full string, but after the / split resolvedName becomes x.svg, producing a URL ending in x.svg.svg. Strip the suffix after resolving the variant/name parts (or strip it from the post-split name).

Comment thread packages/craftcms-cp/src/utilities/overlay-events.ts
Comment thread packages/craftcms-cp/src/index.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@brandonkelly
brandonkelly merged commit b12286b into 6.x Jul 15, 2026
25 checks passed
@brandonkelly
brandonkelly deleted the feature/remove-web-awesome branch July 15, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants